<!DOCTYPE html>
<html>
<head>
<title>Web Camera</title>
<meta charset="utf-8">
<style type="text/css">
html, body {
    margin: 0px;
    width: 100%;
    height: 100%;
}

#camera {
    margin: 0px;
    border: none;
    width: 100%;
    height: 98%;
}
</style>
</head>
<body>
<iframe id=camera ></iframe>

<script>
Webcam = top.Tian.Class(top.Tian.Embeded, {
    onRun: function () {
        top.Tian.Embeded.prototype.onRun.apply(this, arguments);
        
        // create media
        if (this.theApp) {
            var dom = document.getElementById('camera');
            dom.setAttribute('src', this.theApp.camera);
        }
    },

    CLASS_NAME: "Webcam"
});

function tianMain(options) {
    return new Webcam(options);
}
</script>
</body>
</html>
